<style>
	.table4_7 table {
		width: 100%;
		margin: 15px 0;
		border: 0;
	}
	
	.table4_7 th {
		background-color: #00A5FF;
		color: #FFFFFF
	}
	
	.table4_7,
	.table4_7 th,
	.table4_7 td {
		font-size: 0.95em;
		text-align: center;
		padding: 8px;
		padding-left: 10px;
		padding-right: 30px;
		border-collapse: collapse;
	}
	
	.table4_7 th,
	.table4_7 td {
		border: 1px solid #6dcbfe;
		border-width: 1px 0 1px 0
	}
	
	.table4_7 tr {
		border: 1px solid #6dcbfe;
	}
	
	.table4_7 tr:nth-child(odd) {
		background-color: #aae1fe;
	}
	
	.table4_7 tr:nth-child(even) {
		background-color: #fdfdfd;
	}
</style>
<table class=table4_7>
	<tr>
		<th>编号</th>
		<th>书名</th>
		<th>出版社</th>
		<th>出版日期</th>
		<th>作者</th>
		<th>类型</th>
		<th>数量</th>
		<th>操作</th>
	</tr>
	<?php 
		require_once "app/conn.php";
		
		//del
		if(!empty($_GET['del']))
		{
			$sql="DELETE FROM book WHERE id=".$_GET['del'];
			$conn->query($sql);
		}
		
		//list
		$sql="select * from book";
		$result = $conn->query($sql);
		while($row = mysqli_fetch_assoc( $result )){
		?>
	<tr>
		<td><?PHP echo $row["id"]?></td>
		<td><?PHP echo $row["书名"]?></td>
		<td><?PHP echo $row["出版社"]?></td>
		<td><?PHP echo $row["出版日期"]?></td>
		<td><?PHP echo $row["作者"]?></td>
		<td><?PHP echo $row["类型"]?></td>
		<td><?PHP echo $row["数量"]?></td>
		<td>
			<a href="/houtai.php?ctr=list&del=<?php echo $row["id"]?>" style="float: left;">删除</a>
			<a href="/houtai.php?ctr=change&change=<?php echo $row["id"]?>" style="float: left;padding-left: 5px;">修改</a>
			<div style="clear: both;"></div>
		</td>
	</tr>
	
	<?php }?>
</table>